home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1997 January / Macworld (1997-01).dmg / Updaters / WDEFLeopard_1_2_3 / Read Me next >
Text File  |  1996-10-25  |  4KB  |  93 lines

  1.  WDEF Leopard 1.2.3 
  2.  
  3.  
  4. by Maf Vosburgh
  5. 25th of October 1996
  6.  
  7. Price Info
  8. WDEF Leopard is free.
  9. Share and enjoy.
  10.  
  11. Contact Info
  12. maf@mmcorp.com
  13.  
  14. http://www.mmcorp.com/~maf
  15.  
  16. Legal Info
  17. This software is supplied "As Is" without warranty of any kind, and the author does not accept responsibility for any damage it might
  18. accidentally cause. 
  19.  
  20. Info for Normal People
  21. There has been a lot of panic recently about the "WDEF crash" : system error 87.
  22. I wrote this control panel to prevent the problem from happening.
  23. Just drag it to your Control Panels folder and restart. The default options should work fine.
  24. It installs a friendly "WDEF Leopard" who will try to guard your system from harm with her powerful paws. 
  25.  
  26. Info for Geeks
  27. Because of a design limitation in the Window Manager, WDEF resources cannot safely be purgeable.
  28. This is documented, but barely (as pointed out by Robert Thornton).
  29. Here is why they should not be purgeable- if the custom WDEF for a window gets purged, and the Window Manager tries to redraw that
  30. window while the app is in the background, it fails to reload the WDEF code, because it calls LoadResource with the wrong current resource
  31. file.
  32.  
  33. The Window Manager engineers could fix this by -
  34. a) inserting one line of code (a call to HNoPurge) in their code that loads custom WDEFs, 
  35. or
  36. b) inserting a few lines of code around their call to LoadResource so they use the right resource file
  37. or
  38. c) at least publicising the fact that WDEFs should not be purgeable.
  39.  
  40. In the meantime, this control panel aims to fix the problem by briefly taking control whenever an application is launched and marking the
  41. resources in question non-purgeable. It does not save these changes to disk, so it shouldn't cause problems with updaters, virus checkers,
  42. backup programs etc.
  43.  
  44. Other resource types
  45. Once I had the code working, I got a bit carried away and added protection for other resource types. By default this is turned off. 
  46.  
  47. Like WDEF resources, MENU resources should not be purgeable. However this is such a rare programming mistake for someone to make
  48. that the check is probably unnecessary. Enable this only if you get system error 84 on a regular basis.
  49.  
  50. CDEF and MDEF resources probably don't need protection, as the operating system is supposed to be able to reload these as needed.. 
  51. Enable CDEF protection only if you have problems with system error 88.
  52. Enable MDEF protection only if you have problems with system error 89.
  53.  
  54. Revision History
  55. Version 1.0
  56. First release. 
  57.  
  58. Version 1.1
  59. I added MDEF, CDEF and MENU resources to the list of types to preload and make unpurgeable.
  60. This has improved the robustness of certain programs considerably when put to the standard test - switch to ZoneRanger, purge the heap of
  61. the target app, then make it redraw while in the background.
  62.  
  63. Version 1.2 
  64. Made it into a Control Panel, so users can choose which resources are preloaded. 
  65. Removed the option to preload MENUs, as this crashes ClarisWorks 4.0.
  66.  
  67. Version 1.2.1
  68. In line with various suggestions made by Robert Thornton, I changed the strategy of the code - it now no longer preloads resources, just
  69. marks them non-purgeable in the resource map. This is faster, uses less memory, and also fixes the previous MENU conflict with
  70. ClarisWorks. That has enabled me to reinstate the MENU protection feature (which protects you from system error 84). The patch on
  71. _InitGraf is now a proper head-patch (don't worry if you don't know what that means). 
  72.  
  73. Version 1.2.2 
  74. Made a small change to make the Leopard compatible with old black and white machines with a 68000 processor. People with other Macs
  75. may as well stick with 1.2.1.
  76.  
  77. Version 1.2.3
  78. Changed the control panel to make the user interface clearer.
  79. The WDEF protection is essential, but the other options are rarely needed. There is now a "Use Defaults" button that turns WDEF protection
  80. on, and turns the other options off.
  81. Added balloon help to state which options tackle which system errors.
  82.  
  83.  
  84. Thanks to
  85. Robert Thornton for key information.
  86. Graham Bartram for the name.
  87. Dan Salmon for being the first tester.
  88. Binky and Kevin for being cool.
  89. Vik Rubenfeld for pointing the problem out on Usenet.
  90. Tracy Valleu, Troy Gaul, Robert Thornton and Ric Ford for other info.
  91.  
  92.  
  93.